/**
 * 
 */
package com.design.patterns.fabrqiue;

import java.util.ArrayList;

/**
 * @author ok
 * 
 */
public class JInstrFactory {
	public static JInstr createJJCode(String jj_code, int adress, String jj_instr, ArrayList<String> parameters) {
		if(jj_code.equals("new"))
			return new JNew(adress, jj_instr, parameters);
		if(jj_code.equals("invoke"))
			return new JInvoke(adress, jj_instr, parameters);
		return null;
	}
}
